package com.forsythia.sns.to;

import java.util.Date;

import com.forsythia.sns.Constants;
import com.forsythia.sns.DateUtils;

public class UserTO extends BaseTO{

    private static final long serialVersionUID = -6604686220159651441L;

    private String userId;
    private String loginName;
    private String email;
    private String password;
    private String userName;
    private String gender;
    private Date birthday;
    private String birthdayLunar;
    private String hometown;
    private String residence;
    private String bodyform;
    private String blood;
    private String marriage;
    private String icon;

    public String getUserId() {
        return this.userId;
    }

    public UserTO setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public String getLoginName() {
        return this.loginName;
    }

    public UserTO setLoginName(String loginName) {
        this.loginName = loginName;
        return this;
    }

    public String getEmail() {
        return this.email;
    }

    public UserTO setEmail(String email) {
        this.email = email;
        return this;
    }

    public String getPassword() {
        return this.password;
    }

    public UserTO setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getUserName() {
        return this.userName;
    }

    public UserTO setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    public String getGender() {
        return this.gender;
    }

    public UserTO setGender(String gender) {
        this.gender = gender;
        return this;
    }

    public Date getBirthday() {
        return this.birthday;
    }

    public UserTO setBirthday(Date birthday) {
        this.birthday = birthday;
        return this;
    }

    public String getBirthdayLunar() {
        return this.birthdayLunar;
    }

    public UserTO setBirthdayLunar(String birthdayLunar) {
        this.birthdayLunar = birthdayLunar;
        return this;
    }

    public String getHometown() {
        return this.hometown;
    }

    public UserTO setHometown(String hometown) {
        this.hometown = hometown;
        return this;
    }

    public String getResidence() {
        return this.residence;
    }

    public UserTO setResidence(String residence) {
        this.residence = residence;
        return this;
    }

    public String getBodyform() {
        return this.bodyform;
    }

    public UserTO setBodyform(String bodyform) {
        this.bodyform = bodyform;
        return this;
    }

    public String getBlood() {
        return this.blood;
    }

    public UserTO setBlood(String blood) {
        this.blood = blood;
        return this;
    }

    public String getMarriage() {
        return this.marriage;
    }

    public UserTO setMarriage(String marriage) {
        this.marriage = marriage;
        return this;
    }

    public String getIcon() {
        return this.icon;
    }

    public UserTO setIcon(String icon) {
        this.icon = icon;
        return this;
    }
    
    public String getBirthdayAsString(){
        if(Constants.BOOLEAN_Y.equalsIgnoreCase(birthdayLunar)){
            return DateUtils.toLunarString(birthday);
        }else{
            return birthday.toString();
        }
    }

}